package com.qyer.search.enums;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by tangzheng on 16/7/27.
 */
public enum ZSKUSTG {
  DIY(158, "机酒自由行"),
  LOCAL(159, "城市玩乐"),
  LOCAL_GROUP(172, "当地参团"),
  WIFI(163, "WiFi/电话卡"),
  VISA(149, "签证"),
  TRAFFIC(166, "交通接送"),
  HOTEL(157, "酒店"),
  PLANE(145, "机票"),
  SHIP(148, "邮轮"),
  TICKET(160, "门票/票券"),
  ZUCHE(139, "租车"),
  INSURANCE(150, "保险"),
  FREE(146, "自由行"),
  LG(173, "当地游"),
  LCAR(174, "接送机/包车"),
  TT(175, "交通票券"),
  OTHER(-1, "未知一级类目");

  public static Map<Integer, String> SKU_TYPE1_MAP = new HashMap<>();

  static {
    for (ZSKUSTG type1 : EnumSet.allOf(ZSKUSTG.class)) {
      SKU_TYPE1_MAP.put(type1.getId(), type1.getDesc());
    }
  }

  private int id;

  private String desc;

  ZSKUSTG(int id, String desc) {
    this.id = id;
    this.desc = desc;
  }

  public int getId() {
    return id;
  }

  public String getDesc() {
    return desc;
  }

  public static String toDesc(int id) {
    switch (id) {
      case 158:
        return DIY.getDesc();
      case 159:
        return LOCAL.getDesc();
      case 172:
        return LOCAL_GROUP.getDesc();
      case 163:
        return WIFI.getDesc();
      case 166:
        return TRAFFIC.getDesc();
      case 157:
        return HOTEL.getDesc();
      case 145:
        return PLANE.getDesc();
      case 150:
        return INSURANCE.getDesc();
      case 149:
        return VISA.getDesc();
      case 148:
        return SHIP.getDesc();
      case 160:
        return TICKET.getDesc();
      case 139:
        return ZUCHE.getDesc();
      case 146:
        return FREE.getDesc();
      case 173:
        return LG.getDesc();
      case 174:
        return LCAR.getDesc();
      case 175:
        return TT.getDesc();
      default:
        return OTHER.getDesc();
    }
  }
}
